package com.example.user.myqq;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class XinXi extends AppCompatActivity {
    TextView textView1;
    TextView textView2;
    TextView textView3;
    TextView textView4;
    Button button;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.xinxi);
        Intent intent = this.getIntent();
        Contentlist contentlist = (Contentlist)intent.getSerializableExtra("contentlist");
        textView1 = (TextView) findViewById(R.id.text);
        textView2 = (TextView) findViewById(R.id.text2);
        textView3 = (TextView) findViewById(R.id.text3);
        textView4 = (TextView) findViewById(R.id.text4);
        button = (Button) findViewById(R.id.button);
        textView1.setText("标题:"+contentlist.getTitle());
        textView2.setText("内容:"+contentlist.getText());
        textView3.setText("类型:"+String.valueOf(contentlist.getType()));
        textView4.setText("CT:"+contentlist.getCt());
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(XinXi.this,DengLu.class);
                startActivity(intent);
                finish();
            }
        });
    }
}
